package com.robot.base.configs

import com.robot.base.R
import com.robot.base.util.AppUtils

interface AppConstants {
    /**
     * value规则： /(module后缀)/(所在类名)
     * 路由 A_ : Activity
     */
    interface Router {
        object Main {
            //首页
            const val A_MAIN = "/app/MainActivity"
            const val A_VIDEO = "/app/VideoActivity"

            //举报
            const val A_REPORT = "/app/ReportActivity"
        }

        object HOME {
            //案例详情
            const val A_CASE_DETAILS = "/app/home/CaseDetailsActivity"

            //搜索
            const val A_SEARCH = "/app/home/SearchActivity"

            //限时优惠
            const val A_LIMITED_TIME = "/app/home/LimitedTimeActivity"
        }

        object Login {
            //登陆页面
            const val A_LOGIN = "/app/login/LoginActivity"

            const val A_LOGIN_PASSWORD = "/app/login/LoginPasswordActivity"

            const val A_LOGIN_CODE = "/app/login/LoginCodeActivity"

            const val A_LOGIN_FORGOT_PASSWORD = "/app/login/ForgotPasswordActivity"

            const val A_LOGIN_BIND_PHONE = "/app/login/BindPhoneActivity"

            const val A_LOGIN_BIND_ACCOUNT = "/app/login/BindAccountActivity"
        }

        object Project {
            const val A_PROJECT_LIST = "/app/project/ProjectListActivity"

            const val A_TEAM_MANAGER = "/app/project/TeamManagerActivity"

            const val A_ADD_TEAM = "/app/project/AddTeamActivity"

            const val A_MEMBER_MANAGER = "/app/project/MemberManagerActivity"

            const val A_MEMBER_SEARCH = "/app/project/MemberSearchActivity"

            const val A_TAG_MANAGER = "/app/project/TagManagerActivity"

            const val A_EDIT_TAG= "/app/project/EditTagActivity"

            const val A_SELECT_MEMBER= "/app/project/SelectMemberActivity"

            const val A_SELECT_TEAM= "/app/project/SelectTeamActivity"

            const val A_PERSONAL_PROFILE= "/app/project/PersonalProfileActivity"

            const val A_MY_PROJECT_DETAIL= "/app/project/MyProjectDetailActivity"

            const val A_RELEASE_PROJECT= "/app/project/ReleaseProjectActivity"

            const val A_MEMBER_FRAME= "/app/project/MemberFrameActivity"

            const val A_MEMBER_FRAME_PROFILE= "/app/project/MemberFrameProfileActivity"

            const val A_ADD_MEMBER= "/app/project/AddMemeberActivity"

            const val A_SET_REWARD= "/app/project/SetRewardActivity"

            const val A_SET_JOB= "/app/project/SetJobActivity"

            const val A_CREATE_ORDER= "/app/project/CreateOrderActivity"

            const val A_SELECT_PROJECT= "/app/project/SelectProjectActivity"

            const val A_BALANCE_PROJECT = "/app/project/BalanceProjectActivity"

        }


        object Mine {
            //基本信息
            const val A_MINE_PROFILE = "/app/PersonalProfileActivity"

            const val A_MINE_PERSONAL_PAGE = "/app/PersonalPageActivity"

            const val A_MINE_COURSE_CENTER = "/app/CourseCenterActivity"

            const val A_MINE_COURSE_PROFILE = "/app/CourseProfileActivity"

            const val A_MINE_PROJECT_CENTER = "/app/ProjectCenterActivity"

            const val A_MINE_RESOURCE_CENTER = "/app/ResourceCenterActivity"

            //资源详情
            const val A_MINE_RESOURCE_PROFILE = "/app/ResourceProfileActivity"

            const val A_MINE_PERSONAL_WORKS = "/app/PersonalWorksActivity"

            const val A_MINE_PERSONAL_COUPON = "/app/PersonalCouponActivity"

            const val A_MINE_WITHDRAW_CENTER = "/app/WithdrawCenterActivity"

            const val A_MINE_WITHDRAW = "/app/WithdrawActivity"

            const val A_MINE_SYSTEM_NOTIFICATION = "/app/SystemNotificationActivity"

            const val A_MINE_PERSONAL_WORKS_DATA = "/app/PersonalWorksDataActivity"

            const val A_MINE_SHOPPING_CAR = "/app/ShoppingCarActivity"

            const val A_MINE_OFFLINE_CACHE = "/app/OfflineCacheActivity"

            const val A_MINE_SETTING = "/app/SettingActivity"

            const val A_MINE_SETTING_MESSAGE = "/app/MessageSettingActivity"

            const val A_MINE_SETTING_ACCOUNT = "/app/AccountSettingActivity"

            const val A_MINE_SETTING_PRIVACY = "/app/PrivacySettingActivity"

            const val A_MINE_MODIFY_ACCOUNT = "/app/ModifyAccountActivity"

            const val A_MINE_FEEDBACK = "/app/FeedbackActivity"

            const val A_MINE_OPEN_VIP = "/app/OpenVipActivity"

            const val A_MINE_FOLLOW_FANS = "/app/FollowFansActivity"

            const val A_MINE_CONFIRM_ORDER = "/app/ConfirmOrderActivity"

            const val A_MINE_PAY_RESULT = "/app/PayResultActivity"

            const val A_MINE_COMMENT_PROFILE = "/app/CommentProfileActivity"

            const val A_MINE_COMMENT_INPUT = "/app/CommentInputActivity"

        }

    }

    object BundleKey {
        const val RECOMMEND_TYPE = "recommendType"
        const val TITLE = "title"
        const val TYPE = "type"
        const val ID = "id";
        const val MEMBER_BEAN = "member_bean";
        const val REWARD_MONEY = "reward_money";
        const val MEMBER_JOB = "member_job";
        const val KEYWORD = "keyword";
        const val IDS = "ids";
        const val CLASSIFICATION_DATA = "classification_data"
        const val CLASSIFICATION_FIRST_POSITION = "classification_FIRST_POSITION"
        const val CLASSIFICATION_SECOND_POSITION = "classification_SECOND_POSITION"
        const val COLLECTION_DATA = "collection_data"


        /**
         * 评论
         */
        const val COMMENT_PARENT_ID = "comment_parent_id"
        const val COMMENT_ACCOUNT_ID = "comment_account_id"
        const val COMMENT_PRODUCT_ID = "comment_product_id"
        const val COMMENT_PRODUCT_TYPE = "comment_product_type"

        /**
         * 发布作品
         */
        const val RELEASE_DRAFT_WORKS = "release_draft_works"

        /**
         * 确认订单
         */
        const val ORDER_TYPE = "order_type";
        const val SHOP_CART_BEAN = "shop_cart_bean";

        /**
         * 项目详情
         */
        const val PROJECT_ACCOUNT_ARRAY = "project_account_array"


        const val SELECT_MEMBER_TYPE = "select_member_type"

    }

    object LiveKey {
        const val HOME_TAB = "homeTab"
        const val LOGIN_SUCCESS = "loginSuccess"
        const val COMMENT_SUCCESS = "commentSuccess"

        const val COURSE_PLAY = "course_play"

        const val RESOURCE_FILTER = "resource_filter"

        const val REFRESH_TEAM = "refresh_team"
        const val REFRESH_MEMBER = "refresh_member"
        const val REFRESH_LABEL = "refresh_label"
        const val REFRESH_PROJECT_PROFILE_MEMBER = "refresh_project_profile_member"
        const val REFRESH_PROJECT_LIST = "refresh_project_list"
        const val REFRESH_PROJECT_PROFILE = "refresh_project_profile"

        const val SELECT_TAG_MEMBER = "select_tag_member"

    }

    object BundleValue {
        const val MASTER_COURSE = 0
        const val CLASS_CASE = 1
        const val POPULAR_RESOURCES = 2
        const val VIP = 4


        /**
         * 评论
         */
        const val COMMENT_TYPE_COURSE = 0
        const val COMMENT_TYPE_WORKS = 1

        /**
         * 确认订单
         */
        const val ORDER_TYPE_COURSE = 1;
        const val ORDER_TYPE_RESOURCE = 2;
        const val ORDER_TYPE_VIP = 3;

        /**
         * 选择人员
         */
        const val SELECT_MEMBER_TYPE_FRAME = 101

        const val SELECT_MEMBER_TYPE_MANAGER = 100

    }

    object SpKey {
        const val APP_SHOW_GUIDE_VIEW = "APP_SHOW_GUIDE_VIEW"
        const val APP_SHOW_GUIDE_VIEW_FOR_USER = "APP_SHOW_GUIDE_VIEW_FOR_USER"
        const val CAL_SHOW_TIME = "CAL_SHOW_TIME"
        const val SEARCH_HISTORY = "SEARCH_HISTORY"
        const val UPDATE_VERSION = "UPDATE_VERSION"
        const val IS_SHOW_UPDATE = "IS_SHOW_UPDATE"
        const val VIP_VIEW = "VIP_VIEW"

        /**
         * 是否同意了启动页展示的隐私协议弹框
         */
        const val APP_SPLASH_AGREEMENT = "APP_SPLASH_AGREEMENT"

        /**
         * 是否点击过首页扫描按钮
         */
        const val HOME_SCAN_CLICK = "home_scan_click"

        /**
         * 上一次进入app的时间
         */
        const val APP_LAST_EXIT_TIME = "app_last_exit_time"

        /**
         * 首页商品请求随机数
         */
        const val HOME_GOODS_RANDOM = "home_goods_random"


        const val PREFERENCE_FILE_NAME = "base"
        const val LOGIN_STATE = "mlstate"
        const val LOGINING = "dlld"
        const val LOGINOUT = "zxld"
        const val NOTLOGIN = "mydld"

        //登陆返回
        const val USERILOGININFO = "userLoginInfo"

        //用户详情
        const val USERINFO = "userInfo"

    }

    object ActivityRequestCode{

        const val SET_WARD_RESULT = 101

        const val SET_JOB_RESULT = 102

    }
    object BizKey {
        var HOT_CATE_ID = 9999

        const val ORI_VER = 1
        const val ORI_HORI = 2
        var DIR_APK: String? = null

        //bugly app key
        const val BUGLY_APPKEY = "c143f0716a"
        const val UMENG_APPKEY = "5d5672c84ca3578086000cdd"
        const val UMENG_MSG_SECRET = "a5dd929a10c8682156073e6fd8ce1ea2"
        const val NETEASE_QIYU_APPKEY = "3021f1a85ee22d52317aa7bdec3dd7b1"

        //相关app idwxa0047becc08f5c0a
        const val WX_APP_ID = "wx2b733957227f8046"
        const val WX_APP_SECRET = "a0e7929362ff93094bc56b0cd778a82c"

        const val WEIBO_APP_ID = "3042698560"
        const val WEIBO_APP_SECRET = "8733fd2d7dece8a76df6938414dc19f9"
        const val WEIBO_REDIRECT_URL = "https://api.weibo.com/oauth2/default.html"
        const val QQ_APP_ID = "102037211"
        const val QQ_APP_SECRET = "ysa5MOCl5A1cy72i"

        const val DEFAULT_CHANNEL = "DEFAULT_CHANNEL"

        const val CHANNEL_FCJ_NOTIFICATION = "channel_fcj"
        const val TARGET_INTENT_KEY = "TARGET_INTENT_KEY"
        const val PUSH_INFO_KEY = "PUSH_INFO_KEY"

        const val QQ = "qq"
        const val WX = "wechat"
        const val WEIBO = "weibo"
    }


    enum class ApiErrorType(var code: Int, var message: String) {
        //非业务错误
        INTERNAL_SERVER_ERROR(500, AppUtils.getApp().getString(R.string.base_error_2)), BAD_GATEWAY(
            502, AppUtils.getApp().getString(R.string.base_error_3)
        ),
        NOT_FOUND(404, AppUtils.getApp().getString(R.string.base_error_4)), CONNECTION_TIMEOUT(
            408, AppUtils.getApp().getString(R.string.base_error_5)
        ),
        UNEXPECTED_ERROR(700, AppUtils.getApp().getString(R.string.base_error_1));
    }
}